package com.ebid.templates.tenn;

import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;

public class TenderBulletinPhaseTem {

    private  String tenderBulletinPhaseTem = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
            "<tenderBulletinPhase>\n" +
            "    <TENDER_PROJECT_CODE>{0}</TENDER_PROJECT_CODE>\n" +
            "    <BID_SECTION_CODES>\n" +"{1}"+
            "    </BID_SECTION_CODES>\n" +
            "    <TENDER_CODE>{2}</TENDER_CODE>\n" +
            "    <NOTICE_NAME>{3}</NOTICE_NAME>\n" +
            "    <NOTICE_CONTENT>{4}</NOTICE_CONTENT>\n" +
            "    <NOTICE_SEND_TIME>{5}</NOTICE_SEND_TIME>\n" +
            "    <NOTICE_MEDIA>{6}</NOTICE_MEDIA>\n" +
            "    <URL>{7}</URL>\n" +
            "    <NOTICE_NATURE>{8}</NOTICE_NATURE>\n" +
            "    <NOTICE_TYPE>{9}</NOTICE_TYPE>\n" +
            "    <DOC_GET_START_TIME>{10}</DOC_GET_START_TIME>\n" +
            "    <DOC_GET_END_TIME>{11}</DOC_GET_END_TIME>\n" +
            "    <DOC_GET_METHOD>{12}</DOC_GET_METHOD>\n" +
            "    <BID_DOC_REFER_END_TIME>{13}</BID_DOC_REFER_END_TIME>\n" +
            "    <BID_DOC_REFER_METHOD>{14}</BID_DOC_REFER_METHOD>\n" +
            "    <BID_URL>{15}</BID_URL>\n" +
            "    <SYNDICATED_FLAG>{16}</SYNDICATED_FLAG>\n" +
            "    <IS_POSTPONE>{17}</IS_POSTPONE>\n" +
            "    <BID_OPEN_TIME>{18}</BID_OPEN_TIME>\n" +
            "    <BID_OPEN_METHOD>{19}</BID_OPEN_METHOD>\n" +
            "    <TENDERERS>\n" +"{20}"+
            "    </TENDERERS>\n" +
            "    <TENDER_AGENCYS>\n" +"{21}"+
            "    </TENDER_AGENCYS>\n" +
            "    <OTHER_CONTENT>{22}</OTHER_CONTENT>\n" +
            "    <BULLETIN_DUTY>{23}</BULLETIN_DUTY>\n" +
            "    <EXAMINER_NAME>{24}</EXAMINER_NAME>\n" +
            "    <ATTACHMENT_SET>\n" +"{25}"+
            "    </ATTACHMENT_SET>\n" +
            "    <TRADE_PLAT>{26}</TRADE_PLAT>\n" +
            "    <PUB_SERVICE_PLAT_CODE>{26}</PUB_SERVICE_PLAT_CODE>\n" +
            "    <SUBMIT_TIMESTAMP>{27}</SUBMIT_TIMESTAMP>\n" +
            "</tenderBulletinPhase>";

    public String getTenderBulletinPhaseTem() {
        return tenderBulletinPhaseTem;
    }

    public void setTenderBulletinPhaseTem(String tenderBulletinPhaseTem) {
        this.tenderBulletinPhaseTem = tenderBulletinPhaseTem;
    }





    public static String init(Map map){

        //  拼接 BID_SECTION_CODE

//        List<String> list = map.get("");
//        StringBuilder BID_SECTION_CODES = new StringBuilder();
//        String BID_SECTION_CODE = "<BID_SECTION_CODE>{0}</BID_SECTION_CODE>";
//        for (Object s : list){
//            BID_SECTION_CODE = MessageFormat.format(BID_SECTION_CODE,s);
//            BID_SECTION_CODES.append(BID_SECTION_CODE);
//        }



        TenderBulletinPhaseTem temp = new TenderBulletinPhaseTem();
        String returnVal = temp.tenderBulletinPhaseTem;
        returnVal = MessageFormat.format(returnVal,
                map.get(""),
                "",
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get(""),
                map.get("")

        );
        System.out.println(returnVal);
        return returnVal;
    }
    public static void main(String[] args) {

////        TenderBulletinPhaseTem bulletinPhaseTem = new TenderBulletinPhaseTem();
//        Map map = new HashMap();
//        init(map);
////        bulletinPhaseTem.getTenderBulletinPhaseTem() = MessageFormat.format(bulletinPhaseTem.getTenderBulletinPhaseTem(),
////                "11"
////        );
//
//


        System.out.println();

    }
}
